import { post } from '@/utils/request'

// 获取文件列表（区分文件路径）
export const getFileListByPath = p => post(`/service-file/file/v1/getfilelist`, p)
// 获取文件列表（区分文件类型）
export const getFileListByType = (p) => post(`/service-file/file/v1/selectfilebyfiletype`, p, 'get')
// 获取回收站文件列表
export const getRecoveryFile = (p) => post(`/service-file/recoveryfile/v1/list`, p, 'get')
// 获取我已分享的文件列表
export const getMyShareFileList = (p) => post(`/service-file/share/v1/shareList`, p)
// 获取存储占用
export const getStorage = (p) => post(`/service-file/filetransfer/v1/getstorage`, p, 'get')
// 获取文件目录树
export const getFoldTree = (p) => post(`/service-file/file/v1/getfiletree`, p, 'get')
// 创建文件
export const createFold = (p) => post(`/service-file/file/v1/createFold`, p)
// 获取文件详细信息
export const getFileDetail = (p) => post(`/service-file/file/v1/detail/${p.fileId}`, p, 'get')
// 删除文件
export const deleteFile = (p) => post(`/service-file/file/v1/deletefile`, p)
// 复制文件
export const copyFile = (p) => post(`/service-file/file/v1/copyFile`, p)
// 移动文件
export const moveFile = (p) => post(`/service-file/file/v1/moveFile`, p)
// 重命名文件
export const renameFile = (p) => post(`/service-file/file/v1/renameFile`, p)
// 解压文件
export const unzipFile = (p) => post(`/service-file/file/v1/unzipFile`, p)
// 全局搜索文件
export const searchFile = (p) => post(`/service-file/file/v1/search`, p, 'get')
// 分享文件
export const shareFile = (p) => post(`/service-file/share/v1/shareFile`, p, 'get')
// 校验分享链接过期时间
export const checkShareLinkEndtime = (p) => post(`/service-file/share/v1/checkendtime`, p, 'get')
// 校验分享链接是否需要提取码
export const checkShareLinkType = (p) => post(`/service-file/share/v1/sharetype`, p, 'get')
// 校验分享链接提取码是否正确
export const checkShareLinkCode = (p) => post(`/service-file/share/v1/checkextractioncode`, p, 'get')
// 获取分享文件列表
export const getShareFileList = (p) => post(`/service-file/share/v1/sharefileList`, p, 'get')
// 保存分享文件
export const saveShareFile = (p) => post(`/service-file/share/v1/saveShareFile`, p)
// 批量删除文件
export const batchDeleteFile = (p) => post(`/service-file/file/v1/batchdeletefile`, p)
// 批量移动文件
export const batchMoveFile = (p) => post(`/service-file/file/v1/batchMoveFile`, p)
// 回收站文件删除
export const deleteRecoveryFile = (p) => post(`/service-file/recoveryfile/v1/deleteRecoveryFile`, p)
// 回收站文件还原
export const restoreRecoveryFile = (p) => post(`/service-file/recoveryfile/v1/restorefile`, p)
// 回收站文件批量删除
export const batchDeleteRecoveryFile = (p) => post(`/service-file/recoveryfile/v1/batchdelete`, p)
// 文件预览
export const getFilePreview = (p) => post(`/service-file/filetransfer/v1/preview`, p, 'get')
// 文件修改
export const modifyFileContent = (p) => post(`/service-file/file/v1/update`, p)
// 创建文档
export const createOfficeFile = (p) => post(`/service-file/file/v1/createFile`, p)
// 编辑文档
export const editOfficeFile = (p) => post(`/service-file/office/v1/editOfficeFile`, p, 'get')
// 查看文档
export const previewOfficeFile = (p) => post(`/service-file/office/v1/previewOfficeFile`, p)
// 获取公告列表 - 带分页查询
export const getNoticeList = (p) => post(`/service-file/notice/v1/list`, p, 'get')
// 获取公告详情
export const getNoticeDetail = (p) => post(`/service-file/notice/v1/detail`, p, 'get')
// 查询系统参数组
export const getParamsDetail = (p) => post(`/service-file/param/v1/grouplist`, p, 'get')
